﻿<UserControl x:Class="WaveTech.Scutex.Manager.Forms.BasicSettings"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Manager="clr-namespace:WaveTech.Scutex.Manager" mc:Ignorable="d" 
             x:Name="basicSettingsControl"
             d:DesignHeight="450" d:DesignWidth="720">
	<UserControl.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/DataTemplates.xaml" />
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</UserControl.Resources>
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition />
			<RowDefinition />
			<RowDefinition />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition />
			<ColumnDefinition />
		</Grid.ColumnDefinitions>


		<GroupBox Grid.Row="0" Grid.Column="0" Header="Project Information" Margin="2,2,2,2">
			<Grid Height="110" VerticalAlignment="Top">
				<Grid.RowDefinitions>
					<RowDefinition Height="30" />
					<RowDefinition Height="31" />
					<RowDefinition Height="30" />
					<RowDefinition Height="11*" />
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="18" />
					<ColumnDefinition Width="63" />
					<ColumnDefinition Width="153*" />
				</Grid.ColumnDefinitions>

				<TextBlock Text="License Id:" Height="Auto" VerticalAlignment="Center" TextAlignment="Left" Grid.ColumnSpan="2" Margin="0,8" />
				<TextBox Grid.Column="2" VerticalAlignment="Top" Height="25px" Margin="2,2,2,2" IsReadOnly="True" Text="{Binding ElementName=basicSettingsControl, Mode=OneWay, Path=License.UniqueId, Converter={StaticResource guidToStringConverter}}"  />

				<TextBlock Grid.Row="1" Text="Project Name:" VerticalAlignment="Center" Grid.ColumnSpan="2" Margin="0,11" />
				<TextBox  Grid.Row="1" Grid.Column="2" VerticalAlignment="Top" Height="25px" Margin="2,2,2,2" Text="{Binding License.Name, ElementName=basicSettingsControl, Mode=TwoWay}"/>
				<ComboBox Grid.Column="2" x:Name="cboProduct" ItemsSource="{Binding Source={StaticResource productsData}, Mode=OneWay}" SelectedItem="{Binding License.Product, ElementName=basicSettingsControl, Mode=TwoWay}" VerticalAlignment="Center" Height="25px" Text="" Margin="2,2,2,2" DisplayMemberPath="Name" SelectionChanged="cboProduct_SelectionChanged" Grid.Row="2" />
				<TextBlock Grid.Row="2" Text="Product:" Height="Auto" VerticalAlignment="Center" TextAlignment="Left" HorizontalAlignment="Left" Width="Auto" Grid.ColumnSpan="2" />
			</Grid>
		</GroupBox>

		<GroupBox Grid.Row="0" Grid.RowSpan="2" Grid.Column="1" Header="Encryption Keys" Margin="4,4,4,4">
			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition Height="35px" />
					<RowDefinition Height="25px" />
					<RowDefinition />
					<RowDefinition Height="25px" />
					<RowDefinition />
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="78" />
					<ColumnDefinition Width="*" />
				</Grid.ColumnDefinitions>

				<TextBlock Grid.Column="0" Grid.Row="0" Text="Bit Strength:" Margin="0,10" VerticalAlignment="Center" HorizontalAlignment="Left" Width="72" />
				<ComboBox x:Name="cboBitStrengths" Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" Height="25px" Focusable="False" Text="" Margin="0,4,162,0" ItemsSource="{Binding}">
					<ComboBoxItem Content="1024" />
					<ComboBoxItem Content="1536" />
					<ComboBoxItem Content="2048" IsSelected="True" />
					<ComboBoxItem Content="4096" />
				</ComboBox>
				<Button Grid.Column="2" Grid.Row="0" Content="Regenerate Keys" HorizontalAlignment="Right" VerticalAlignment="Center" Width="128" Name="btnRegenerateKeys" Click="btnRegenerateKeys_Click" />

				<TextBlock Grid.Row="1" Text="Private Key:" VerticalAlignment="Center" />
				<TextBox  Grid.Row="2" Grid.ColumnSpan="2" Text="{Binding License.KeyPair.PrivateKey, ElementName=basicSettingsControl, Mode=OneWay}" IsReadOnly="True" TextWrapping="Wrap" />

				<TextBlock Grid.Row="3" Text="Public Key:" VerticalAlignment="Center" Grid.ColumnSpan="2"  />
				<TextBox  Grid.Row="4" Text="{Binding License.KeyPair.PublicKey, ElementName=basicSettingsControl, Mode=OneWay}" IsReadOnly="True" HorizontalAlignment="Stretch" TextWrapping="Wrap" Grid.ColumnSpan="2" Margin="4,4,4,4" />
			</Grid>
		</GroupBox>

		<GroupBox Grid.Row="1" Grid.Column="0" Header="Application Information" Margin="4,4,4,4">
			<Grid VerticalAlignment="Top">
				<Grid.RowDefinitions>
					<RowDefinition Height="30" />
					<RowDefinition Height="30" />
					<RowDefinition Height="30" />
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="85" />
					<ColumnDefinition Width="*" />
					<ColumnDefinition Width="60" />
				</Grid.ColumnDefinitions>
				<!--<igRibbon:ButtonTool x:Name="btnAddProduct" Command="{x:Static Manager:Commands.ProductsCommand}" Grid.Column="2" Content="Add" Margin="0,4,6,6" HorizontalAlignment="Right" VerticalAlignment="Center" Width="40" Height="24"  /> -->

				<TextBlock Text="Support Email:" Grid.ColumnSpan="2" Height="Auto" VerticalAlignment="Center" TextAlignment="Left" Margin="0,10,0,9" HorizontalAlignment="Left" Width="Auto" />
				<TextBox Grid.Column="1" Grid.ColumnSpan="2" Margin="2,2,2,2" Text="{Binding License.SupportEmail, ElementName=basicSettingsControl, Mode=TwoWay}" />


				<TextBlock Grid.Row="1" Text="Sales Email:" Height="Auto" VerticalAlignment="Center" TextAlignment="Left" Margin="0,12,0,7" HorizontalAlignment="Left" Width="Auto" />
				<TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Margin="2,2,2,2" Text="{Binding License.SalesEmail, ElementName=basicSettingsControl, Mode=TwoWay}" />
				
				<TextBlock Height="Auto" HorizontalAlignment="Left" Margin="0,11,0,8" Text="Sales Phone:" TextAlignment="Left" VerticalAlignment="Center" Width="Auto" Grid.Row="2" Grid.ColumnSpan="2" />
				<TextBox Grid.ColumnSpan="2" Margin="104,2,2,2" Text="{Binding License.SalesPhone, ElementName=basicSettingsControl, Mode=TwoWay}" Grid.Column="1" Grid.Row="2" />
			</Grid>
		</GroupBox>

		<GroupBox Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Header="Project Urls" Margin="4,4,4,4">
			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition Height="30"  />
					<RowDefinition Height="30"  />
					<RowDefinition Height="30"  />
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="114" />
					<ColumnDefinition Width="366*" />
				</Grid.ColumnDefinitions>

				<TextBlock Text="Buy Now Url:" Height="22" VerticalAlignment="Center" TextAlignment="Left" Margin="0,1,0,6" HorizontalAlignment="Left" Width="114" />
				<TextBox Grid.Row="0" Grid.Column="1" Margin="4" Text="{Binding License.BuyNowUrl, ElementName=basicSettingsControl, Mode=TwoWay}" />

				<TextBlock Grid.Row="1" Text="Eula Url:" Height="23" VerticalAlignment="Center" TextAlignment="Left" Margin="0,1,0,5" HorizontalAlignment="Left" Width="114" />
				<TextBox Grid.Row="01" Grid.Column="1" Margin="4" Text="{Binding License.EulaUrl, ElementName=basicSettingsControl, Mode=TwoWay}" />

				<TextBlock Grid.Row="2" Text="Product Homepage:" Height="22" VerticalAlignment="Center" TextAlignment="Left" Margin="0,1,0,6" HorizontalAlignment="Left" Width="114" />
				<TextBox Grid.Row="2" Grid.Column="1" Margin="4" Text="{Binding License.ProductUrl, ElementName=basicSettingsControl, Mode=TwoWay}" />
			</Grid>
		</GroupBox>

	</Grid>
</UserControl>
